<?php
class QcyjStorevItemInfoModelModel extends Model {
	public $tableField = array (
        'item_no',
        'item_subno',
        'item_name',
        'item_subname',
        'item_clsno',
        'item_brand',
        'item_brandname',
        'base_price',
        'sale_price',
        'item_size');
    public function getPrimaryKey(){
        return $this -> primaryKey = 'item_no';
    }
    public function getTableFields(){
         return $this -> tableField;			
    }
    
    public function tableName(){
         return $this -> tableName = 't_bd_item_info';
    }

    /**
     * 地域列表
     * 
     * @access public 
     * @return boolean 
     */
     public function getLists($where = "1=1" ){
        $result = $this -> getAll($where, null, array('*'), null, null, null);
        return $result;
     }


    /**
     * 添加数据
     *
     * @access public
     * @return boolean
     */
    public function addData($post_value){
        $data = array();
        foreach($this->tableField as $row ){
            $data[$row] = $post_value[$row];
        }
        return $this -> insert($data);
    }

}
